package cn.com.db.dao;


import cn.com.db.dto.ItemGoodsDto;
import cn.com.db.model.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface GoodsDao {

    void createGoods(Goods goods);

    Goods getGoodsById(@Param("id")String id);

    Goods getAliveGoodsById(@Param("id")String id);

    ItemGoodsDto getItemGoodsDtoById(@Param("id")String id);

    Integer getGoodsNum();

    List<Goods> getStoreGoods(@Param("storeId")String storeId,
                              @Param("rowStart")Integer rowStart,
                              @Param("pageSize")Integer pageSize);

    Integer countStoreGoods(@Param("storeId")String storeId);

    void updateGoods(Goods goods);

}
